package com.example.springbott.wx_controller;

import com.example.springbott.bean.BaseRespVo;
import com.example.springbott.bean.zeng.WXCatalogCurrentVo;
import com.example.springbott.bean.zeng.WXCatalogIndexVo;
import com.example.springbott.wx_service.WXCatalogService;
import com.fasterxml.jackson.databind.ser.Serializers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zeng
 * @Description:
 * @date: 22:18 2022/11/22
 */
@RestController
@RequestMapping("wx/catalog")
public class WXCatalogController {

    @Autowired
    WXCatalogService wxCatalogService;

    @RequestMapping("current")
    public BaseRespVo current(Integer id) {
        WXCatalogCurrentVo wxCatalogCurrentVo = wxCatalogService.current(id);
        return BaseRespVo.ok(wxCatalogCurrentVo);
    }

    @RequestMapping("index")
    public BaseRespVo index() {
        WXCatalogIndexVo wxCatalogIndexVo = wxCatalogService.index();
        return BaseRespVo.ok(wxCatalogIndexVo);
    }

}
